package com.koala.domain.vo;

import lombok.Data;

/**
 * @author koala
 * @date 2022/11/29 16:42
 */
@Data
public class CaptchaImage {

    private String code;
    private String images;


    /*public static void main(String[] args) throws IOException {
        DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
        Properties properties = new Properties();
        // 字体
        properties.setProperty(Constants.KAPTCHA_TEXTPRODUCER_FONT_NAMES, "宋体,楷体,微软雅黑");
        properties.setProperty(Constants.KAPTCHA_BORDER, "no");

        Config config = new Config(properties);
        defaultKaptcha.setConfig(config);
        // 生成文字验证码
        String text = defaultKaptcha.createText();
        System.out.println(text);
        // 生成图片验证码
        BufferedImage image = defaultKaptcha.createImage(text);
        File file = new File("images.jpg");
        FileOutputStream out = new FileOutputStream(file);
        ImageIO.write(image, "jpg", out);
        out.close();
    }*/
}
